package com.kaiyiweitong.tongxing.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import com.kaiyiweitong.tongxing.R;
import com.kaiyiweitong.tongxing.util.CommonUtil;


/**
 * Created by Administrator on 2017/9/13 0013.
 */

public class ExitLoginDialog extends Dialog {
    private Context mContext;

    public ExitLoginDialog(Context context) {
        super(context);
        mContext = context;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        Window window = getWindow();
        window.getDecorView().setPadding(0, 0, 0, 0);
        WindowManager.LayoutParams params = window.getAttributes();

        params.width= CommonUtil.dip2px(mContext,280);
        params.height= CommonUtil.dip2px(mContext,146);
        window.setAttributes(params);
        window.setBackgroundDrawable(null);//背景透明
        setContentView(R.layout.dialog_exit_login);
    }
}